package crl.encrypt.ignores
{
	import com.swfwire.decompiler.abc.ABCFile;
	import com.swfwire.decompiler.abc.tokens.InstanceToken;
	import com.swfwire.decompiler.abc.tokens.MultinameToken;
	import com.swfwire.decompiler.abc.tokens.NamespaceSetToken;
	import com.swfwire.decompiler.abc.tokens.StringToken;
	import com.swfwire.decompiler.abc.tokens.multinames.IMultiname;

	public class InstanceIgnoreInfo extends AbsIgnore
	{
		public function InstanceIgnoreInfo()
		{
			super();
		}
		
		override public function start(abc:ABCFile):void{
			var multinames:Vector.<MultinameToken>=abc.cpool.multinames;
			var strings:Vector.<StringToken>=abc.cpool.strings;
			var nsSets:Vector.<NamespaceSetToken>=abc.cpool.nsSets;
			var multiname:IMultiname;
			var name:String;
			var namespaceSet:NamespaceSetToken;
			
			for each(var instance:InstanceToken in abc.instances){
				
				multiname=multinames[instance.name].data;
				
				if("name" in multiname){
					name=strings[multiname["name"]].utf8;
				}
				if("ns" in multiname){
					//namespaceSet=nsSets[multiname["ns"]]
				}
				
				trace(name,namespaceSet);
			}
		}
	}
}